EventAction<'T>Union

PackageFCQRS
Defines the possible actions an aggregate or saga actor can take after processing a command or event. <typeparam name="'T">The type of the event payload associated with the action (e.g., for PersistEvent).</typeparam>

Specification

Kind
Union
Members
24
Examples
0
IsIgnoreEventSignature
this.IsIgnoreEvent
IsUnstashSignature
this.IsUnstash
IsRunAsyncSignature
this.IsRunAsync
IsStashSignature
this.IsStash
IsUnhandledEventSignature
this.IsUnhandledEvent

Summary

NameSignatureSynopsis
IsIgnoreEventthis.IsIgnoreEventNo description available.
IsUnstashthis.IsUnstashNo description available.
IsRunAsyncthis.IsRunAsyncNo description available.
IsStashthis.IsStashNo description available.
IsUnhandledEventthis.IsUnhandledEventNo description available.
IsPersistAndSnapshotthis.IsPersistAndSnapshotNo description available.
IsPersistAllEventsthis.IsPersistAllEventsNo description available.
IsDeferEventthis.IsDeferEventNo description available.
IsPublishEventthis.IsPublishEventNo description available.
IsUnstashAllthis.IsUnstashAllNo description available.
IsStateChangedEventthis.IsStateChangedEventNo description available.
IsPersistEventthis.IsPersistEventNo description available.
PersistEventPersistEvent 'TPersist the event to the journal.
PersistAllEventsPersistAllEvents 'T listPersist several events from one command as a single journal AtomicWrite: all land or none do (one DB transaction in the SQL plugins), and no state update, publish or saga wake-up happens until the whole batch is durable.
PersistAndSnapshotPersistAndSnapshot 'TPersist the event and, once it is durable and folded, immediately save a snapshot — a manual checkpoint, independent of the SnapshotPolicy cadence.
DeferEventDeferEvent 'TPublish and fold the event in the live actor without storing it or incrementing the persisted version.
PublishEventPublishEvent Event<'T>Publish the event immediately to the mediator without persisting it.
IgnoreEventIgnoreEventIgnore the event or command completely.
UnhandledEventUnhandledEventIndicate that the command or event could not be handled in the current state.
StateChangedEventStateChangedEvent 'TIndicate that the state of a saga has changed (used internally by sagas for persistence).
StashStash EventAction<'T>No description available.
UnstashUnstash EventAction<'T>No description available.
UnstashAllUnstashAll EventAction<'T>No description available.
RunAsyncRunAsync objDispatch an async side effect (e.g.

IsIgnoreEvent

this.IsIgnoreEvent
Member

Returns

bool

IsUnstash

this.IsUnstash
Member

Returns

bool

IsRunAsync

this.IsRunAsync
Member

Returns

bool

IsStash

this.IsStash
Member

Returns

bool

IsUnhandledEvent

this.IsUnhandledEvent
Member

Returns

bool

IsPersistAndSnapshot

this.IsPersistAndSnapshot
Member

Returns

bool

IsPersistAllEvents

this.IsPersistAllEvents
Member

Returns

bool

IsDeferEvent

this.IsDeferEvent
Member

Returns

bool

IsPublishEvent

this.IsPublishEvent
Member

Returns

bool

IsUnstashAll

this.IsUnstashAll
Member

Returns

bool

IsStateChangedEvent

this.IsStateChangedEvent
Member

Returns

bool

IsPersistEvent

this.IsPersistEvent
Member

Returns

bool

PersistEvent

PersistEvent 'T
Member
Persist the event to the journal. The actor's state will be updated using the event handler *after* persistence succeeds.

Parameters

NameTypeDescription
Item'T

Returns

unit

PersistAllEvents

PersistAllEvents 'T list
Member
Persist several events from one command as a single journal AtomicWrite: all land or none do (one DB transaction in the SQL plugins), and no state update, publish or saga wake-up happens until the whole batch is durable. Versions are allocated sequentially. Atomic for THIS aggregate instance only — atomicity across aggregates is saga territory. Note the read side still projects the batch event-by-event (durability is atomic, read-model visibility is not).

Parameters

NameTypeDescription
Item'T list

Returns

unit

PersistAndSnapshot

PersistAndSnapshot 'T
Member
Persist the event and, once it is durable and folded, immediately save a snapshot — a manual checkpoint, independent of the SnapshotPolicy cadence.

Parameters

NameTypeDescription
Item'T

Returns

unit

DeferEvent

DeferEvent 'T
Member
Publish and fold the event in the live actor without storing it or incrementing the persisted version.

Parameters

NameTypeDescription
Item'T

Returns

unit

PublishEvent

PublishEvent Event<'T>
Member
Publish the event immediately to the mediator without persisting it. The actor's state is not updated.

Parameters

NameTypeDescription
ItemEvent<'T>

Returns

unit

IgnoreEvent

IgnoreEvent
Member
Ignore the event or command completely. No persistence, publishing, or state update occurs.

Returns

unit

UnhandledEvent

UnhandledEvent
Member
Indicate that the command or event could not be handled in the current state.

Returns

unit

StateChangedEvent

StateChangedEvent 'T
Member
Indicate that the state of a saga has changed (used internally by sagas for persistence).

Parameters

NameTypeDescription
Item'T

Returns

unit

Stash

Stash EventAction<'T>
Member

Parameters

NameTypeDescription
ItemEventAction<'T>

Returns

unit

Unstash

Unstash EventAction<'T>
Member

Parameters

NameTypeDescription
ItemEventAction<'T>

Returns

unit

UnstashAll

UnstashAll EventAction<'T>
Member

Parameters

NameTypeDescription
ItemEventAction<'T>

Returns

unit

RunAsync

RunAsync obj
Member
Dispatch an async side effect (e.g. an AI/oracle read) as a "mini saga" without the saga's persistence ceremony. The payload is an INSPECTABLE DATA description of the effect (boxed) — NOT a closure — so `decide` stays a pure `(command, state) -> effect` function you can unit-test by asserting `decide cmd state = RunAsync (box (ClusterThemes texts))` without any runtime. The oracle lives in the runner registered at `Fcqrs.aggregateWithEffects`, which maps the description to a command; that command is sent back to THIS aggregate (reusing the originating CID) and re-enters `decide`, re-validated against current state. EPHEMERAL: the in-flight work is process state, NOT journaled. A crash, restart, or shard rebalance while it runs loses it SILENTLY — nothing re-issues it. Use this only when that loss is tolerable; when the result MUST survive a crash, use a saga (which persists its intent). TOTAL: the registered runner must map every outcome (oracle error, timeout) to a command (e.g. `ClusteringFailed`), never let an exception escape — `Fcqrs.total` helps. An escaping exception fail-fasts the process, like a throwing fold.

Parameters

NameTypeDescription
Itemobj

Returns

unit